Repository navigation
fix(store): keep table.views in sync with store.views - #3225
Open
AndyScherzinger wants to merge 1 commit into
Open
AndyScherzinger wants to merge 1 commit into
AndyScherzinger wants to merge 1 commit into
Conversation
The navigation renders a table's views from table.views, while most of the app reads store.views. Both start out holding the same view objects, but setView replaces the entry in store.views with the object the server returned and leaves table.views pointing at the old one, so the two collections diverge on the first rename. Visible effects: - Renaming a view updates the title everywhere except the navigation entry below its table, which keeps the old title until a reload. - Deleting a view removes it from store.views only. The navigation still lists it, and Dashboard.vue reads table.views to build the per-view share counts, so it then calls .filter() on the columns of a view that no longer exists. Mirror both writes in the parent table inside setView and removeView, so every caller gets the sync rather than each one repeating it. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
store.viewsandtable.viewsstart out holding the same view objects, so writing to one used to be visible through the other.setViewbroke that by replacing the entry instore.viewswith the object the server returned, leavingtable.viewson the old one. From the first rename onwards the two collections hold different data.What that looks like in the app:
store.viewsshows the new title, while the navigation entry under its table — which readstable.views— keeps the old one until a page reload.store.viewsonly. The navigation still lists it, andDashboard.vuebuilds its per-view share counts fromtable.views, so it calls.filter()on the columns of a view that is gone.Both writes are now mirrored into the parent table inside
setViewandremoveView, so every caller gets the sync instead of each one repeating it.Verified against a running instance before and after: renaming a view used to leave
store.viewsreadingBoard RENAMEDwhiletable.viewsstill readBoard, and a deleted view stayed intable.views.Based on #3219, which rewrote
setView— please merge that first.🖼️ Screenshots
Not applicable, no visual change beyond the navigation entry showing the correct title.
🏁 Checklist
/backport to stableX.X🤖 AI (if applicable)